#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    void moveZeroes(vector<int>& nums) {
        for (int cur = 0, des = -1; cur < nums.size(); cur++)
        {
            if (nums[cur])
            {
                swap(nums[cur], nums[++des]);
            }
        }

    }
};